package com.hopes.bizz.risk.transfer.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Documented
@Constraint(validatedBy = {UuidValidator.class})
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
public @interface UUID {

    String message() default "数据不符合UUID正则";

    Class<?>[] groups() default {};
    /**
     * 是否允许空值
     **/
    boolean allowEmpty() default false;

    Class<? extends Payload>[] payload() default {};
}
